<?php
require('../../../../lib/base.php');
$base=new base('web');
$session=$base->library('session',array('build'=>false));
if(!$session->ISSESS()){
	$helper=$base->library('helper');
	$helper->SMessage(5,domain.'view/Login.php?back='.domain.'home/data/report.php',"no","登陆失效,5秒后转到登陆页");
	exit();
}
$data['menu']=$base->cache(array('tag'=>'web.header','time'=>86400));
$data['menu']=unserialize($data['menu']);
$data['HomeMenu']=$base->cache(array('tag'=>'web.home.menu','time'=>86400));
$data['HomeMenu']=unserialize($data['HomeMenu']);
$data['foot']=$base->cache(array('tag'=>'web.footer','time'=>86400));
$transform=$base->model('data');
$data['total']=$transform->select('transform',array('select'=>'COUNT(*) AS count','where'=>array('member='=>$session->GVAR('member'))));
$data['total']=reset($data['total']);$data['total']=$data['total']['count'];
$data['transform']=$transform->select('transform',array('where'=>array('member ='=>$session->GVAR('member')),'limit'=>array(intval($base->get('start')),10),'order'=>array('date'=>'DESC')));
$pagination=$base->library('pagination',array('base_url'=>domain.'home/module/system.php?','total_rows'=>$data['total'],'per_page'=>10,'first_link'=>'首页','last_link'=>'末页','cur_tag_open'=>'<a href="#" class="active">','cur_tag_close'=>'</a>'));
$data['pagination']=$pagination->create_links();
$base->set($data);
$base->view('home/data/report.php');
?>